import request from '@/config/axios'

export interface AppDsgnVO {
                    id: number
                    title: string
                    alias: string
                    resId: number
                    formDsgnId: number
                    flowDsgnId: number
                    mode: number
                    icon: string
                    version: number
                    remark: string
                    releaseTime: Date
                    status: number
                    createDept: number
                    deployState: number
                    maintState: number
                    ownerUser: string
                    triggerMode: number
}

// 查询应用设计列表
export const getAppDsgnPage = async (params) => {
  return await request.get({ url: '/res/app-dsgn/page', params })
}

// 查询应用设计详情
export const getAppDsgn = async (id: number) => {
  return await request.get({ url: '/res/app-dsgn/get?id=' + id })
}

// 新增应用设计
export const createAppDsgn = async (data: AppDsgnVO) => {
  return await request.post({ url: '/res/app-dsgn/create', data })
}

// 修改应用设计
export const updateAppDsgn = async (data: AppDsgnVO) => {
  return await request.put({ url: '/res/app-dsgn/update', data })
}

// 删除应用设计
export const deleteAppDsgn = async (id: number) => {
  return await request.delete({ url: '/res/app-dsgn/delete?id=' + id })
}

// 导出应用设计 Excel
export const exportAppDsgnApi = async (params) => {
  return await request.download({ url: '/res/app-dsgn/export-excel', params })
}